{% set AZs = (az_cephmon_compose | json_query('[*].availability_zone') | unique) %}
[DEFAULT]
debug = {{ dims_agent_logging_debug }}
log_file = {{ dims_agent_log_dir }}dimsagent-agent.log
data_dir = {{ dims_agent_data_dir }}
auth_strategy = keystone
api_paste_config = /etc/dimsagent/api-paste.ini
transport_url = {{ rpc_transport_url }}
os_region_name = {{ keystone_service_region }}

ceph_conf = /etc/ceph/ceph.conf
use_adapter = True

[database]
connection = mysql+pymysql://{{ dims_agent_database_user }}:{{ dims_agent_database_password }}@{{ database_address }}:{{ database_port }}/{{ dims_agent_database_name }}?charset=utf8
max_retries = -1

[keystone_authtoken]
auth_url  = {{ keystone_auth_url }}
auth_type = {{ dims_agent_keystone_auth_plugin }}
auth_uri = {{ keystone_auth_url }}
region_name = RegionOne
project_domain_name = Default
user_domain_name = Default
project_name = service
username = {{ dims_agent_service_user_name }}
password = {{ dims_agent_service_password }}

[glance]
username = {{ dims_agent_service_user_name }}
password = {{ dims_agent_service_password }}
auth_url  = {{ keystone_auth_url }}
user_domain_name = Default
project_name = service
project_domain_name = Default
endpoint = http://{{ opensd_vip_address }}:{{ glance_api_port }}
api_version = 2
region_name = RegionOne
glance_ceph_user = glance
glance_ceph_conf = /etc/ceph/ceph.conf
glance_ceph_pool = images
glance_ceph_keyring = /etc/ceph/ceph.client.glance.keyring

[cinder]
username = {{ dims_agent_service_user_name }}
password = {{ dims_agent_service_password }}
auth_url  = {{ keystone_auth_url }}
user_domain_name = Default
project_name = service
project_domain_name = Default
api_version = 3
service_type = volumev3
region_name = RegionOne
endpoint_type = internalURL
enabled_backends = {% for az in AZs %}dims_cinder_{{ az }}@ceph-rbd{% if not loop.last %},{% endif %}{% endfor %}

{% for az in AZs %}
[dims_cinder_{{ az }}@ceph-rbd]
cinder_ceph_user = cinder
cinder_ceph_conf = /etc/ceph/ceph.conf
cinder_ceph_pool = volumes
cinder_ceph_keyring = /etc/ceph/ceph.client.cinder.keyring
{% endfor %}

[nova]
username = {{ dims_agent_service_user_name }}
password = {{ dims_agent_service_password }}
auth_url  = {{ keystone_auth_url }}
project_name = service
region_name = RegionOne
project_domain_name = Default
user_domain_name = Default

[dimsmanager]
username = {{ dims_agent_service_user_name }}
password = {{ dims_agent_service_password }}
auth_url  = {{ keystone_auth_url }}
user_domain_name = Default
project_name = service
project_domain_name = Default
region_name = RegionOne

[oslo_messaging_notifications]
driver = messagingv2

[oslo_middleware]
enable_proxy_headers_parsing = true

[paste_deploy]
flavor = keystone

[oslo_messaging_rabbit]
rpc_conn_pool_size = 30
amqp_durable_queues = True
rabbit_ha_queues = True
